// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

// Make sure that we generate the correct code to call a built-in member function through a parent.

export component TestCase inherits Window {
    width: 100phx;
    height: 100phx;

    out property<bool> selection-set;

    input := TextInput {
        text: "Hello World";
        if (true): TouchArea {
            clicked => {
                input.select-all();
                root.selection-set = input.anchor-position-byte-offset == 0 && input.cursor-position-byte-offset == 11;
            }
        }
    }
}

/*

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(!instance.get_selection_set());
slint_testing::send_mouse_click(&instance, 5., 5.);
assert(instance.get_selection_set());
```

```rust
let instance = TestCase::new().unwrap();
assert!(!instance.get_selection_set());
slint_testing::send_mouse_click(&instance, 5., 5.);
assert!(instance.get_selection_set());
```

```js
var instance = new slint.TestCase();
assert(!instance.selection_set);
slintlib.private_api.send_mouse_click(instance, 5., 5.);
assert(instance.selection_set);
```
*/
